<?php


namespace app\common\enum;


class GoodsEnum
{
    //状态
    const UNSHELVE = 0;//仓库中
    const SHELVE = 1;//销售中


    /**
     * @notes 状态
     * @param bool $value
     * @return string|string[]
     * @author ljj
     * @date 2022/2/9 11:21 上午
     */
    public static function getShowDesc($value = true)
    {
        $data = [
            self::UNSHELVE => '仓库中',
            self::SHELVE => '销售中'
        ];
        if ($value === true) {
            return $data;
        }
        return $data[$value];
    }
}